home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / fmodla13.zip / TERMINAL.DEF < prev    next >
Text File  |  1992-01-29  |  2KB  |  72 lines

  1. DEFINITION MODULE Terminal;
  2.  
  3. (* (C) Copyright 1987 Fitted Software Tools. All rights reserved. *)
  4.  
  5. (*
  6.     All the actual I/O is performed by invoking a procedure from TermBase.
  7.  
  8.     The client module may redirect the terminal I/O by using the procedures
  9.     provided for that effect in TermBase.
  10. *)
  11.  
  12.  
  13. PROCEDURE KeyPressed() :BOOLEAN;
  14. (*
  15.     is there any input available?
  16. *)
  17.  
  18. PROCEDURE Read( VAR ch :CHAR );
  19. (*
  20.     return the next input character using TermBase.Read
  21. *)
  22.  
  23. PROCEDURE ReadLine( VAR string :ARRAY OF CHAR );
  24. (*
  25.     read a whole line (using Read), echoing the characters read except for
  26.     the terminating character (EOL or ESC).
  27.  
  28.     ASCII.BS will cause the last character read to be deleted.
  29.     ASCII.DEL will cause all characters read to be deleted.
  30.     ASCII.ESC will cause all characters read to be deleted and the input
  31.               is terminated.
  32.  
  33.     ReadAgain followed by Read can be used to get the terminating character
  34.     (EOL or ESC).
  35. *)
  36.  
  37. PROCEDURE ReadAgain;
  38. (*
  39.     force the next call to Read to return the last character read again
  40. *)
  41.  
  42. PROCEDURE Write( ch :CHAR );
  43. (*
  44.     write ch through TermBase.Write
  45. *)
  46.  
  47. PROCEDURE WriteString( string :ARRAY OF CHAR );
  48. (*
  49.     write the string using Write.
  50. *)
  51.  
  52. PROCEDURE WriteLn;
  53. (*
  54.     same as: Write( ASCII.EOL )
  55. *)
  56.  
  57. PROCEDURE WriteLine( string :ARRAY OF CHAR );
  58. (*
  59.     same as: WriteString( string ); WriteLn;
  60. *)
  61.  
  62. PROCEDURE ClrScreen;
  63. (*
  64.     same as: Write( ASCII.FF )
  65. *)
  66.  
  67. PROCEDURE Goto( line, pos :CARDINAL );
  68. (*
  69.     TermBase.Goto( line, pos )
  70. *)
  71.  
  72. END Terminal.